package com.dtm.ui;

import com.dtm.R;
import com.dtm.R.layout;
import com.dtm.R.menu;
import com.dtm.client.SensorThread;

import android.os.Bundle;
import android.os.Vibrator;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.Menu;
import android.widget.TextView;

public class EndGameActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_end_game);
		TextView txtLoserName = (TextView) findViewById(R.id.txt_loser_name);
		Intent intent = getIntent();
		String loserName = intent.getStringExtra("loserName");
		txtLoserName.setText(loserName);
		
		Vibrator vibrator = (Vibrator) getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE);
		long[] pattern = new long[]{0, 4000};
		vibrator.vibrate(pattern, -1);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.end_game, menu);
		return true;
	}

}
